Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RustStream constructor arguments ordering in templates/rust_buf_stream #42

Merged
merged 1 commit into from
Aug 9, 2024
Merged

Fix RustStream constructor arguments ordering in templates/rust_buf_stream #42

merged 1 commit into from
Aug 9, 2024

Conversation

artemyarulin
Copy link
Contributor

Hi, first of all - thanks for the great project!

My compiler is quite strict and complains about an error in on of the template files, this PR fixes it, basically ordering of constructor parameters is wrong:

error: field 'streambuf' will be initialized after base 'std::basic_iostream<char>' [-Werror,-Wreorder-ctor]
        streambuf(RustStreamBuffer(buf)), std::basic_iostream<char>(&streambuf) { }
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        std::basic_iostream<char>(&streambuf) streambuf(RustStreamBuffer(buf))
1 error generated.

Fixed error
```
error: field 'streambuf' will be initialized after base 'std::basic_iostream<char>' [-Werror,-Wreorder-ctor]
        streambuf(RustStreamBuffer(buf)), std::basic_iostream<char>(&streambuf) { }
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        std::basic_iostream<char>(&streambuf) streambuf(RustStreamBuffer(buf))
1 error generated.
```

Signed-off-by: Artem Yarulin <[email protected]>
@Lipt0nas
Copy link
Member

Lipt0nas commented Aug 9, 2024

Hey, thanks a lot for the contribution!

@Lipt0nas Lipt0nas merged commit 1525db3 into NordSecurity:main Aug 9, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants